//
//  PMineReexamineInviteModel.m
//  Btpin
//
//  Created by Vic on 2019/4/7.
//  Copyright © 2019 Vic. All rights reserved.
//

#import "PMineReexamineInviteModel.h"

@implementation PMineReexamineInviteModel

- (void)setValuesForKeysWithDictionary:(NSDictionary<NSString *,id> *)keyedValues {
    self.id = [UIToolsControl dataAnalysis:keyedValues[@"id"]];
    self.resume_id = [UIToolsControl dataAnalysis:keyedValues[@"resume_id"]];
    self.resume_name = [UIToolsControl dataAnalysis:keyedValues[@"resume_name"]];
    self.company_id = [UIToolsControl dataAnalysis:keyedValues[@"company_id"]];
    self.company_name = [UIToolsControl dataAnalysis:keyedValues[@"company_name"]];
    self.job_id = [UIToolsControl dataAnalysis:keyedValues[@"job_id"]];
    self.job_name = [UIToolsControl dataAnalysis:keyedValues[@"job_name"]];
    self.job_wage = [UIToolsControl dataAnalysis:keyedValues[@"job_wage"]];
    self.notes = [UIToolsControl dataAnalysis:keyedValues[@"notes"]];
    self.interview_time = [UIToolsControl dataAnalysis:keyedValues[@"interview_time"]];
    self.interviewTimeYYYYMMddHHmm = (self.interview_time && self.interview_time.length)?[UIToolsControl timestampConversionTime:([self.interview_time integerValue]) andFormat:@"yyyy-MM-dd HH:mm"]:@"";
    self.add_time = [UIToolsControl dataAnalysis:keyedValues[@"add_time"]];
    self.add_timeYYYYMMddHHmm = (self.add_time && self.add_time.length)?[UIToolsControl timestampConversionTime:([self.add_time integerValue]) andFormat:@"yyyy-MM-dd HH:mm"]:@"";
    
    self.address = [UIToolsControl dataAnalysis:keyedValues[@"address"]];
    self.contact = [UIToolsControl dataAnalysis:keyedValues[@"contact"]];
    self.telephone = [UIToolsControl dataAnalysis:keyedValues[@"telephone"]];
    
    self.userid = [UIToolsControl dataAnalysis:keyedValues[@"userid"]];
    self.name = [UIToolsControl dataAnalysis:keyedValues[@"name"]];
    self.avatar = [UIToolsControl dataAnalysis:keyedValues[@"avatar"]];
    self.sex_cn = [UIToolsControl dataAnalysis:keyedValues[@"sex_cn"]];
    self.age = [UIToolsControl dataAnalysis:keyedValues[@"age"]];
    self.education_cn = [UIToolsControl dataAnalysis:keyedValues[@"education_cn"]];
    self.experience_cn = [UIToolsControl dataAnalysis:keyedValues[@"experience_cn"]];
    self.job_title = [UIToolsControl dataAnalysis:keyedValues[@"job_title"]];
    self.interview_date = [UIToolsControl dataAnalysis:keyedValues[@"interview_date"]];
    self.interviewDataYYYYMMddHHmm = (self.interview_date && self.interview_date.length)?[UIToolsControl timestampConversionTime:([self.interview_date integerValue]) andFormat:@"yyyy-MM-dd HH:mm"]:@"";
    
    if (keyedValues[@"hr_info"]) {
        self.hrInfoModel = [[HRInfoModel alloc] init];
        [self.hrInfoModel setValuesForKeysWithDictionary:keyedValues[@"hr_info"]];
    }
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
    
}

- (id)copyWithZone:(NSZone *)zone {
    PMineReexamineInviteModel *model = [[[self class] allocWithZone:zone] init];
    model.id = self.id;
    model.resume_id = self.resume_id;
    model.resume_name = self.resume_name;
    model.company_id = self.company_id;
    model.company_name = self.company_name;
    model.job_id = self.job_id;
    model.job_name = self.job_name;
    model.job_wage = self.job_wage;
    model.notes = self.notes;
    model.interview_time = self.interview_time;
    model.interviewTimeYYYYMMddHHmm = self.interviewTimeYYYYMMddHHmm;
    model.add_time = self.add_time;
    model.address = self.address;
    model.contact = self.contact;
    model.telephone = self.telephone;
    
    model.userid = self.userid;
    model.name = self.name;
    model.avatar = self.avatar;
    model.sex_cn = self.sex_cn;
    model.age = self.age;
    model.education_cn = self.education_cn;
    model.experience_cn = self.experience_cn;
    model.job_title = self.job_title;
    model.interview_date = self.interview_date;
    model.interviewDataYYYYMMddHHmm = self.interviewDataYYYYMMddHHmm;
    
    model.hrInfoModel = [self.hrInfoModel copy];
    
    return model;
}

@end
